package com.ease.framework.layers {
   import com.ease.framework.figures.IFigure;

   import flash.display.DisplayObject;

   /**
    * Primary Layer. 主要放置图形.
    *
    */
   public class PrimaryLayer extends Layer {
      private var _rootFigure:IFigure;

      public function PrimaryLayer() {
         super();
      }

      override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
         super.updateDisplayList(unscaledWidth, unscaledHeight);
      }

      public function setRootFigure(figure:IFigure):void {
         _rootFigure = figure;
         _rootFigure.percentWidth = 100;
         _rootFigure.percentHeight = 100;
         this.addChild(_rootFigure as DisplayObject);
      }

      public function getRootFigure():IFigure {
         return _rootFigure;
      }
   }
}